home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / pascalt2.zip / PROCED3.PAS < prev    next >
Pascal/Delphi Source File  |  1988-01-15  |  593b  |  20 lines

  1.                                 (* Chapter 5 - Program 3 *)
  2. program Make_A_Fruit_Salad;
  3.  
  4. var Apple,Orange,Pear,Fruit : integer;
  5.  
  6. procedure Add_The_Fruit(Value1,Value2 : integer;  (* one-way *)
  7.                        var Total      : integer;  (* two-way *)
  8.                        Value3         : integer); (* one-way *)
  9. begin
  10.    Total := Value1 + Value2 + Value3;
  11. end;
  12.  
  13. begin  (* main program *)
  14.    Apple := 4;
  15.    Orange := 5;
  16.    Pear := 7;
  17.    Add_The_Fruit(Apple,Orange,Fruit,Pear);
  18.    Writeln('The fruit basket contains ',Fruit:3,' fruits');
  19. end.  (* of main program *)
  20.